#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<set>
#include<string>
#include<vector>
#include<map>
using namespace std;
int main()
{
	set<int> st = { 1,2,4,56,7,6254 };
	set<int> st1;
	st1.insert(1);
	st1.insert(2);
	st1.insert(3);
	st1.insert(4);
	set<int, greater<int>> st2(st1.begin(), st1.end());
	auto it1 = st1.begin();
	while (it1 != st1.end())
	{
		cout << *it1 << " ";
		it1++;

	}
	cout << endl;
	auto it2 = st2.begin();
	while (it2 != st2.end())
	{
		cout << *it2 << " ";
		it2++;

	}
	cout << endl;
	st2.insert({ 12313,1321 });
	set<string> st3;
	st3.insert("dada");
	st3.insert("dadad");
	st3.insert("dadadd");
	auto findit = st3.find("dadad");
	st3.erase(findit);
	cout << st3.erase("dada") << " ";
	for (auto& e: st3)
	{
		cout << e << " ";
	}
	cout << endl;
	/*int x;
	cin >> x;
	if (st.count(x))
	{
		cout << " zai";
	}
	else
	{
		cout << " buzai";
	}*/
	vector<int> v = { 1,2,3,4 ,51,515,333,3,3,3,3,3,3,3};
	set<int> stt(v.begin(), v.end());
	for (auto& e : stt)
	{
		cout << e << " ";
	}
	cout << endl;
	set<int> sss;
	for (int i = 1; i < 10; i++)
		sss.insert(i * 10);
	auto left = sss.lower_bound(20);
	auto right = sss.upper_bound(70);
	for (auto& e : sss)
	{
		cout << e << " ";
	}
	cout << endl;
	sss.erase(left, right);
	for (auto& e : sss)
	{
		cout << e << " ";
	}
	return 0;
}